CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)

FILE(GLOB_RECURSE parser_srcs ${CMAKE_CURRENT_LIST_DIR}/*.cpp)

IF(UNIX)
    LIST(REMOVE_ITEM parser_srcs "${CMAKE_CURRENT_LIST_DIR}/lex.flex.cpp")
ELSEIF(WIN32)
    LIST(REMOVE_ITEM parser_srcs "${CMAKE_CURRENT_LIST_DIR}/lex.linux.cpp")
ENDIF()

ADD_LIBRARY(Trinity.TSL.Parser ${parser_srcs})
TARGET_LINK_LIBRARIES(Trinity.TSL.Parser PRIVATE Trinity.BCL)
TARGET_INCLUDE_DIRECTORIES(Trinity.TSL.Parser PUBLIC ${CMAKE_CURRENT_LIST_DIR})
